From: Jasper St. Pierre Date: Mon, 19 Aug 2013 14:02:22 +0000 (-0400) Subject: popupMenu: Flip the popup menu triangle for RTL X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3695 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bc3d019ecf9b2a8663da800eabb53f52d7ff4c12;p=gnome-shell.git popupMenu: Flip the popup menu triangle for RTL Triangles should be flipped in RTL. This is the easiest way to do it that doesn't rely on modifying the rotating logic, though it is a bit hacky since the ClutterActor "scale-x" property technically considers the lower bound to be 0. It works, though. --- diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index 524aab56b..dd5b02803 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -958,6 +958,9 @@ const PopupSubMenuMenuItem = new Lang.Class({ this._triangleBin = new St.Widget({ y_expand: true, y_align: Clutter.ActorAlign.CENTER }); this._triangleBin.add_child(this._triangle); + if (this._triangleBin.get_text_direction() == Clutter.TextDirection.RTL) + this._triangleBin.set_scale(-1.0, 1.0); + this.actor.add_child(this._triangleBin); this.menu = new PopupSubMenu(this.actor, this._triangle);